﻿using System;
using System.Windows.Media.Imaging;
using System.Windows.Media;

namespace CloudTaobao
{
    public class WangMessage
    {
        public string direction { get; set; }
        public string time { get; set; }
        public string content { get; set; }
        public string isFromMe
        {
            get
            {
                if (direction.Equals("1"))
                    return "Collapsed";
                else
                    return "Visiable";
            }
        }
        public string isFromOther 
        {
            get 
            {
                if (direction.Equals("0"))
                    return "Collapsed";
                else
                    return "Visiable";
            } 
        }
        public string leftPic {get{return "images/left_green.png";}}
        public string topPic{get{return "images/top_green.png";}}
        public object centerPic
        {
            get
            {
                    return new ImageBrush
                   {
                       ImageSource = new BitmapImage(new Uri("images/center_green.png", UriKind.Relative)),
                       Stretch = Stretch.Fill
                   };
            }
        }
        public string bottomPic{get{return "images/bottom_green.png";}}

        public WangMessage()
        {
            direction = "";
            time = "";
            content = "";
        }
    }
}
